<template>
    <div id="sub">
      {{ id }}
      <button @click="senddata">发送数据给父组件</button>
    </div>
</template>

<script>
    export default {
        name: "subs",
      props:['id'],
      methods:{
          senddata:function () {
            this.$emit('send','hello');
          }
      }
    }
</script>

<style scoped>

</style>
